package book;

public class BookList {
    private  Book[] books =new Book[10];
    private int  usedSides ;//实际有效的书本个数

    public int getUsedSides() {
        return usedSides;
    }

    public void setUsedSides(int usedSides) {
        this.usedSides = usedSides;
    }

    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(int pos, Book book) {
        this.books[pos] = book;
    }
    public  Book[] getBooks(){
        return  books;
    }

    public BookList(){
        this.books[0] =new Book("红楼梦","曹雪芹","小说",55);
        this.books[1] =new Book("追风筝的人","卡勒德·胡赛尼","小说",60);
        this.books [2] =new Book("教父","马里奥。普佐","小说",45);
        this.usedSides =3;

    }

}
